package pers.lipeng.gobang;

import javax.swing.*;
import java.awt.*;

/**
 * @author APengG
 * 棋盘格子
 */
public class ChessBoardCell extends JPanel implements Cloneable{
    private Integer bodyX;
    private Integer bodyY;

    public ChessBoardCell(Integer x,Integer y){
        this.bodyX = x;
        this.bodyY = y;
        this.setLayout(new BorderLayout());
        this.setBackground(new Color(228,187,24));
    }

    @Override
    public ChessBoardCell clone(){
        try{
            ChessBoardCell chessBoardCell = (ChessBoardCell) super.clone();
            return chessBoardCell;
        }catch (CloneNotSupportedException e){
            e.printStackTrace();
        }
        return null;
    }

    public Integer getBodyX() {
        return bodyX;
    }

    public void setBodyX(Integer bodyX) {
        this.bodyX = bodyX;
    }

    public Integer getBodyY() {
        return bodyY;
    }

    public void setBodyY(Integer bodyY) {
        this.bodyY = bodyY;
    }
}
